package cn.edu.scau.cmi.liuxintong.consistentComposite;

import java.util.Set;

public class ConsistentComposite extends ConsistentComponent{
	private String name;
    public void setName(String name) {
    	this.name=name;
    }
    public String getName() {
    	return name;
    }
	public ConsistentComponent getParent() {
		return this.getParent();
	}

	@Override
	public ConsistentComponent add(ConsistentComponent child) {
		this.children.add(child);
		return this;
	}

	@Override
	public ConsistentComponent delete(ConsistentComponent child) {
		children.remove(child);
		return this;
	}

	@Override
	public Set<ConsistentComponent> get() {
		return children;
	}
	
}
